class Solution(object):
    def divideString(self, s, k, fill):
        out = []
        n = len(s)
        index = 0
        while index < n:
            if index + k <= n:
                out.append(s[index: index + k])
                index += k
            else:
                out.append(s[index:] + fill * (k - n + index))
                break
        return out

